// (c) Copyright Alf P. Steinbach 2008.  Changes marked "APS".
// Use, modification and distribution are subject to the "New BSD License"
// as listed at <url: http://www.opensource.org/licenses/bsd-license.php>.
//
// <original comment>
// (C) Copyright Daniel Wallin 2004.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
//
// Contains the definitions of the class template move_source and the function
// template move, which together make move pointers moveable.
// </original comment>

#ifndef ALFS_MOVE_PTRS_MOVE_HPP     // APS: Changed include guard.
#define ALFS_MOVE_PTRS_MOVE_HPP
#include    <alfs/config.hpp>

namespace alfs{ namespace jt{       // APS: boost -> alfs::jt
    
    namespace move_ptrs {

        template<typename Ptr>
        class move_source {
        public:
            move_source(Ptr& ptr) : ptr_(ptr) {}
            Ptr& ptr() const { return ptr_; }
        private:
            Ptr& ptr_;
            move_source(const Ptr&);
        };

    }  // move_ptrs

    template<typename T>
    move_ptrs::move_source<T> move(T& x) 
    {
        return move_ptrs::move_source<T>(x);
    }

} }  // alfs::jt

#endif // #ifndef ALFS_MOVE_PTRS_MOVE_HPP
